﻿<UserControl x:Class="Prometheus.Binding.Test.MainPage"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             xmlns:pro="http://prometheustoolkit.codeplex.com"
             mc:Ignorable="d" d:DesignHeight="300" d:DesignWidth="400">
    <UserControl.Resources>
        <Style TargetType="TextBlock">
            <Setter Property="Margin" Value="5" />
        </Style>
        <Style TargetType="TextBox">
            <Setter Property="Margin" Value="5" />
        </Style>
    </UserControl.Resources>
    <pro:proForm HorizontalAlignment="Stretch" x:Name="form">
        <StackPanel Orientation="Vertical" HorizontalAlignment="Left" Width="200">
            <TextBox>
                <TextBox.Text>
                    <pro:proValidationBinding Path="Text">
                        <pro:proNotEmptyStringRule/>
                    </pro:proValidationBinding>
                </TextBox.Text>
            </TextBox>
            <TextBlock Text="{pro:proReadOnlyBinding Path=Text}"/>
            <TextBlock>
                <TextBlock.Text>
                    <pro:proReadOnlyBinding Path="Text" >
                        <pro:proAddTextConverter AddText="Entered Text: " Mode="Prefix"/>
                    </pro:proReadOnlyBinding>
                </TextBlock.Text>
            </TextBlock>
            <pro:proErrorBlock Margin="5"/>
        </StackPanel>
    </pro:proForm>
</UserControl>